<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<form method="post" id="myFreeBoardListById">
	<table class="table table-striped table-hover ">
<caption><h2 align="center">음악 게시물</h2></caption>
<thead>
  <tr height="45" align="center">
   <th align="center" class="no">No</th>
   <th class="title">제목</th>
  <th class="date">작성일</th>
   <th class="genre">장르</th>
   </tr>
 </thead>
 <tbody id="tbody">
 <c:forEach items="${requestScope.lvo.list}" var="list">
 <tr height="45" align="center"
 ><td>${list.no }</td>
 <td><a href="musicboard_findContentByNo.ju?boardNo=${list.no }">${list.title }</a></td>
 <td>${list.date }</td>
 <td>${list.genre }</td>
 </tr>
 
</c:forEach>
</tbody>
<tfoot >
<tr height="45" align="center">
<td>
<!-- 현재그룹의 시작페이지번호-페이지 그룹당 페이지 수 하여 이동 -->
<c:choose>
<c:when test="${requestScope.mvo.pagingBean.previousPageGroup}">
<a href="${initParam.root}myMusicList.ju?nowPage=${requestScope.mvo.pagingBean.startPageOfPageGroup - requestScope.mvo.pagingBean.numberOfPageGroup}">◀</a>
</c:when>
</c:choose>
</td>
<td>
<!-- 현재 그룹의 페이지번호 출력 및 게시물보기 링크 -->
<c:forEach var= "i" 
begin="${requestScope.lvo.pagingBean.startPageOfPageGroup}" end="${requestScope.lvo.pagingBean.endPageOfPageGroup}">
<a href="${initParam.root}myMusicList.ju?nowPage=${i}">${i}</a>
</c:forEach>
</td>

<td>

<!-- 현재그룹의 마지막페이지번호 +1로 이동 -->
<c:choose>
<c:when test="${requestScope.lvo.pagingBean.nextPageGroup == 'true'}">
<a href="${initParam.root}myMusicList.ju?nowPage=${requestScope.lvo.pagingBean.endPageOfPageGroup +1}">▶</a>
</c:when>
</c:choose>
</table>
</form>
</body>
<a href="${initParam.root}myBoarList.ju">내 게시글 보기</a>
</html>